import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'

Vue.config.productionTip = false

// 全局设置处理价格问题
Vue.filter('priceFilter', (value) => {
  const str = value + ''
  return str.length > 5 ? '￥' + value / 10000 + '万' : '￥' + value
})

Vue.filter('hourFilter', (value) => {
  const date = new Date(value)
  const hour = date.getHours() + 6
  const minutes = date.getMinutes()
  const seconds = date.getSeconds()
  return `${hour} : 0${minutes} : 0${seconds}`
})

console.log(store)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
